import request from '@/utils/request'

// 查询材料类型列表
export function listMaterialType(query) {
  return request({
    url: '/material/materialType/list',
    method: 'get',
    params: query
  })
}

// 查询材料类型详细
export function getMaterialType(materiatypeId) {
  return request({
    url: '/material/materialType/' + materiatypeId,
    method: 'get'
  })
}

// 新增材料类型
export function addMaterialType(data) {
  return request({
    url: '/material/materialType',
    method: 'post',
    data: data
  })
}

// 修改材料类型
export function updateMaterialType(data) {
  return request({
    url: '/material/materialType',
    method: 'put',
    data: data
  })
}

// 删除材料类型
export function delMaterialType(materiatypeId) {
  return request({
    url: '/material/materialType/' + materiatypeId,
    method: 'delete'
  })
}
// 查询材料类型列表
export function getTreeData(query) {
  return request({
    url: '/material/materialType/getTree',
    method: 'get',
    params: query
  })
}
